#ifndef __FPSCONTROL_H__
#define __FPSCONTROL_H__

#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <iostream>
#include <fstream>
#include <GLFW\glfw3.h>

class FramesControl
{
   double time;
   double oldTime;   
   double dTime;
   double frameRate; //frames per second
   double timeCount;
   int frameCount;
   int width, height;
   bool isActive;
   std::string fpsCSV;
   GLFWwindow* window;

   void setWindowTitle (void);
   void writeFpsCSV (void);
public:
   FramesControl (double frameRate, GLFWwindow* w);//frames per second
   bool update (const int &w, const int &h);
   void setFrameRate (const double &fr);
   void setActive (const bool &state);
   const double &getFrameRate (void);
   ~FramesControl ();
};

#endif